I want to hide the date picker after date selection
$('#dp1').datepicker({
format: 'mm-dd-yyyy',
startDate: '-15d',
autoclose: true,
endDate: '+0d' // there's no convenient "right now" notation yet
});
Any help would be appreciated.
Home / DeveloperSection / Forums / Bootstrap datepicker hide after selection
I want to hide the date picker after date selection
$('#dp1').datepicker({
format: 'mm-dd-yyyy',
startDate: '-15d',
autoclose: true,
endDate: '+0d' // there's no convenient "right now" notation yet
});
Any help would be appreciated.
Prakash nidhi Verma
06-Jun-2018if u want to hide the date picker after date selection than attempting to type in the date can cause that behavior which is you did not use. so, use autoclose it's helpful.
Another way for write to datepicker is shown below:
locales , without icon , linked picker ,disabled days.
use functions for date pickers.
Happy Coding :)
Manish Kumar
23-May-2018You can use event changedate() to keep track of when the date is changed together with datepicker('hide') method to hide the datepicker after making selection: